package org.dromara.setting.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.lxk.service.setting.response.SettingConfigItemDto;
import io.github.linpeilie.annotations.AutoMapper;
import io.github.linpeilie.annotations.AutoMappers;
import lombok.Data;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.setting.domain.SettingConfigItem;
import org.dromara.system.domain.vo.SysDictDataVo;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;


/**
 * 配置项视图对象 setting_config_item
 *
 * @author LXK-RY5
 * @date 2024-08-10
 */
@Data
@ExcelIgnoreUnannotated
@AutoMappers(value = {
    @AutoMapper(target = SettingConfigItem.class),
    @AutoMapper(target = SettingConfigItemDto.class)
})
public class SettingConfigItemVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @ExcelProperty(value = "id", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "id")
    private Long id;

    /**
     * 租户
     */
    private String tenantId;

    /**
     * 配置名称
     */
    @ExcelProperty(value = "配置名称")
    private String name;

    /**
     * 配置KEY
     */
    @ExcelProperty(value = "配置KEY")
    private String key;

    /**
     * 配置值
     */
    @ExcelProperty(value = "配置值")
    private String value;

    /**
     * 排序
     */
    @ExcelProperty(value = "排序")
    private Long sortNum;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    /**
     * 值输入类型，input=输入框 image_upload=上传图片
     */
    @ExcelProperty(value = "值输入类型，input=输入框 image_upload=上传图片")
    private String valueInputType;

    /**
     * 配置组
     */
    @ExcelProperty(value = "配置组")
    private Long configGroupId;

    @ExcelIgnore
    private List<SysDictDataVo> sysDicList;
}
